<?xml version="1.0" encoding="utf-8" ?>
<taskrunner name="install.adobereader" version="1.0" date="2008-10-30" maxthreads="1">

  <!-- checks installed version. 
			Change Log:
				2014-01-13 : teriks28 : CR4474 Upgrade version of bundled Adobe Reader version for VIDA
					Changed tasks "check.acrobat", changed parameter "subkey" to 11.0.
					Added exit code for installation tasks.
					Removed delete shortcut taks "remove.acrobat.shortcut.1" and "remove.acrobat.shortcut.2".
					Removed registry tasks "reg.add.1","reg.add.2" and "reg.add.3".
	-->

  <includes>
    <file name="vida.install.settings.xml" />
  </includes>

  <properties>
    <property key="install.src.acrobat.dir" value="${install.src.3pp.products.dir}\adobereader"/>
  </properties>

  <tasks>

    <task name="check.acrobat" typename="@RegistryReadLocalMachine">
      <parameters>
        <parameter name="subkey" value="SOFTWARE\Adobe\Acrobat Reader\11.0\Installer"/>
        <parameter name="value.name" value="Path"/>
        <parameter name="return.value" value="acrobat.exist"/>
        <parameter name="throwException" value="false"/>
        <parameter name="default.value" value="false"/>
      </parameters>
    </task>

    <!--Acrobatreader does not exist run a install-->
    <task name="run.installer" condition="¤{acrobat.exist}=false" typename="@CommandLine">
      <dependencies list="check.acrobat,Write"/>
      <parameters>
        <parameter name="filename" value="msiexec.exe"/>
        <parameter name="arguments" value="/quiet /norestart /i AcroRead.msi"/>
        <parameter name="workingdirectory" value="${install.src.acrobat.dir}"/>
        <parameter name="exitcode.return.value" value="acrobatreader.install.exitcode"/>
      </parameters>
    </task>

    <!--Acrobatreader allready exist run a repair-->
    <task name="run.reinstaller" condition="¤{acrobat.exist}!=false" typename="@CommandLine">
      <dependencies list="check.acrobat,Write"/>
      <parameters>
        <parameter name="filename" value="msiexec.exe"/>
        <parameter name="arguments" value="/quiet /norestart /fa AcroRead.msi"/>
        <parameter name="workingdirectory" value="${install.src.acrobat.dir}"/>
        <parameter name="exitcode.return.value" value="acrobatreader.install.exitcode"/>
      </parameters>
    </task>

  </tasks>

</taskrunner>